/**
 * BillDecorator - This defines how to add certain printouts to the Bill class to "decorate it" as one wishes.
 * CS575 Software Design
 * Group 6
 * Group Members: Anthony Davidson, Kendra Scheesley, Lyndsey Whitman, Stephen Zakrewsky
 * Date: May 19, 2012
 * Main Author(s): Lyndsey Whitman
 * 
 * Modified: 6/1 Stephen Zakrewsky
 */
package edu.drexel.cs575.a3;

import edu.drexel.cs575.a3.location.LocaleEnum;
import java.io.*;

public class BillDecorator implements Bill
{
	private Bill myTrailer;
	
	public BillDecorator(Bill myBill)
	{
		this.myTrailer = myBill;
	}
	
	@Override
	public void printBill()
	{
		if (this.myTrailer !=null)
		{
			this.myTrailer.printBill();
		}
	}

	@Override
	public void setLocaleEnum(LocaleEnum le) {
		if(this.myTrailer != null) {
			this.myTrailer.setLocaleEnum(le);
		}
	}
	
	@Override
	public void displayItem(String name, double price, double weight,
			String units) {
		if(this.myTrailer != null) {
			this.myTrailer.displayItem(name, price, weight, units);
		}
	}

	@Override
	public void display(String text) {
		if(this.myTrailer != null) {
			this.myTrailer.display(text);
		}
	}
	
	@Override
	public void setOutputStream(OutputStream out) {

	}

}
